
//
//  SampuxLoadView.m
//  Sampux
//
//  Created by rzm on 16/10/14.
//  Copyright © 2016年 rzm. All rights reserved.
//

#import "SampuxLoadView.h"

@implementation SampuxLoadView

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        
        UIView *loadView = [[UIView alloc]initWithFrame:CGRectMake(kScreenWidth/2 - 124/2, kScreenHeight * 0.4, 124, 100)];
        
        [self addSubview:loadView];
        loadView.backgroundColor = THSystemBlackColor;
        [loadView setCorner:14];
        
        UIActivityIndicatorView *actView = [[UIActivityIndicatorView alloc]initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
        actView.frame = CGRectMake(0, 0, loadView.width, 60);
        [loadView addSubview:actView];
        [actView startAnimating];
        
        UILabel *lab = [[UILabel alloc]initWithFrame:CGRectMake(0, actView.bottom, loadView.width, 40)];
        [loadView addSubview:lab];
        lab.textColor = THWhiteAlplaColor(0.8);
        lab.text = @"正在连接设备";
        lab.font = THFont(15);
        lab.textAlignment = NSTextAlignmentCenter;
        lab.numberOfLines = 0;
        lab.baselineAdjustment = UIBaselineAdjustmentAlignCenters;
    }
    return self;
}

@end
